<script>
	import {
		isWeiXin
	} from '@/common/helper.js'
    import {siteinfo} from "./siteinfo";
	export default {
		globalData: {
			default_token: 'aca83cb99bb62fd24cd6077f165a7175',
			sign_prefix: 'mianmo',
			gd_web_key: '18ff2354556c04ef90aaed02f2bacbfc', //高德地图web服务key 不是js api key
		},
		onLaunch: function(option) {
            if (option.query.uniacid) {
                uni.setStorageSync('uniacid', option.query.uniacid);
            }

			this.$get('api/config').then(res => {
				this.$u.vuex('vuex_config', res)
			})

			// if (isWeiXin()) {
			// 	if (!this.isLogin && !['/pages/auth/register'].includes(this.$router.currentRoute.path)) {
			// 		uni.reLaunch({
			// 			url: '/pages/auth/login'
			// 		})
			// 	}
			// }
		},
		onShow: function() {
			// console.log('App Show')
		},
		onHide: function() {
			// console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	@import "uview-ui/index.scss";
	@import "static/css/common.scss";

	/*每个页面公共css */
	//确认对话框
	.u-popup-slot {
		width: 100%;
		text-align: center;
		padding: 40rpx 0;

		.u-popup-slot_text {
			font-size: 32rpx;
			font-weight: 500;
		}

		.u-popup-slot_flex {
			display: flex;
			justify-content: space-between;
			margin-top: 50rpx;
			padding: 0 50rpx;

			button {
				border-radius: 30rpx;
				height: 60rpx;
				line-height: 56rpx;
				width: 40%;
				font-size: 26rpx;
				background: none;
			}

			.cancel {
				border: 2rpx solid $theme-color;
				color: $theme-color;
			}

			.confirm {
				border: 2rpx solid $theme-color;
				background: $theme-color;
				color: #fff;
			}
		}
	}

	//微信登录
	.weixin-login {
		position: relative;

		.weixin-login-info {
			margin-left: 15%;
			width: 70%;
			left: 15%;
			border-radius: 20rpx;
			height: 600rpx;
			background: url('https://farm-city.oss-cn-hangzhou.aliyuncs.com/images/chushi.png') center/100% 100% no-repeat;
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: flex-end;
			padding-bottom: 60rpx;
			box-sizing: border-box;

			.text {
				margin-bottom: 20rpx;
				font-size: 30rpx;
				font-weight: 600;
			}

			.weixin-login-btn {
				width: 80%;
				height: 86rpx;
				line-height: 86rpx;
				font-size: 28rpx;
				border-radius: 20rpx;
				background: $theme-color;
			}

			.weixin-login-btn[disabled] {
				background: rgba($theme-color, 0.5);
			}
		}

		.weixin-login-bot {
			text-align: center;
			margin-top: 40rpx;

			image {
				width: 57rpx;
			}
		}
	}

	//分享
	.share-container {
		@include flex-box(row);

		.item {
			flex: 1;
			text-align: center;
			padding: 30rpx 0;

			.fx-img {
				width: 100rpx;
			}

			.title {
				font-weight: 500;
				font-size: 28rpx;
				margin-top: 10rpx;
			}
		}
	}

	//弹窗输入交易密码
	.paypwd-container {
		position: relative;

		.close-img {
			width: 36rpx;
			position: absolute;
			right: 20rpx;
			top: 20rpx;
		}

		.title {
			@include flex-box(row, center, center);
			height: 80rpx;
			font-weight: 500;
			font-size: 28rpx;
		}

		.form-rows {
			padding: 0 30rpx;

			.row-input {
				min-height: 100rpx;
				border-bottom: $global-border;
			}
		}

		.btn-container {
			padding: 30rpx 30rpx 30rpx 30rpx;

			.con-btn {
				background: $theme-color;
				margin: 0 auto;
				border-radius: 40rpx;
				color: #fff;
				font-size: 30rpx;
				height: 80rpx;
				line-height: 80rpx;
				font-weight: 500;
				border-radius: 50rpx;

				&[disabled] {
					background: rgba($color: $theme-color, $alpha: 0.5);
					color: #fff;
				}
			}
		}
	}
</style>